package com.deep.config;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.io.Serializable;

@Component("deepSeekProperties")
@ConfigurationProperties(prefix = "deep")
public class DeepSeekProperties implements Serializable, InitializingBean {

    private static final long serialVersionUID = -938140353158555787L;

    /**
     * 请求地址
     */
    private String requestUrl;

    /**
     * 应用密钥
     */
    private String apiKey;

    /**
     * 应用模型
     */
    private String model;

    public String getApiKey() {
        return apiKey;
    }

    public void setApiKey(String apiKey) {
        this.apiKey = apiKey;
    }

    public String getRequestUrl() {
        return requestUrl;
    }

    public void setRequestUrl(String requestUrl) {
        this.requestUrl = requestUrl;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    /**
     * 对外开放属性
     */
    public static String REQUEST_URL;

    public static String API_KEY;

    public static String MODEL;

    @Override
    public void afterPropertiesSet() throws Exception {
        REQUEST_URL = requestUrl;
        API_KEY = apiKey;
        MODEL = model;
    }
}
